package com.twu.biblioteca;

/**
 * Created with IntelliJ IDEA.
 * User: Demon
 * Date: 13-7-3
 * Time: 下午2:47
 * To change this template use File | Settings | File Templates.
 */
public class User {
    String userName=new String();
    String userPassword= new String();
    String userPhoneNumber=new String();
    String userEmailAddress=new String();
    int userLevel;      //the grade of user

    User (){
        userPassword="123456";
        userPhoneNumber="123456";
        userEmailAddress="123456@gmail.com";
        userLevel=0;
    }

    public String getUserPhoneNumber(){
        //System.out.println(userPhoneNumber) ;
        return userPhoneNumber;
    }

    public String getUserEmailAddress(){
        //System.out.println(userEmailAddress);
        return userEmailAddress;
    }

    public void setUserName(String s) {
        userName=s;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserLevel(int i){
        userLevel=i;
    }

    public int getUserLevel(){
        return userLevel;
    }

    public boolean checkUserValid(String strName,String strPassword){
        if(strName.equals(userName)&&strPassword.equals(userPassword)){
            return true;
        }
        else {
            return false;
        }
    }
}
